package com.rency.mtds.starter.client;

import com.rency.mtds.starter.client.advice.DataSourceRouteAdvice;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author: caiyu.ren
 * Created on 2019/9/2 15:57
 * @version: V1.0.0
 * @since JDK 11
 */
@Configuration
public class MtdsAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean
    public DataSourceRouteAdvice dynamicDataSourceAdvice() {
        return new DataSourceRouteAdvice();
    }
}
